home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / util / misc / gpatch.lha / GPatch / ExampleScripts / CompareScript < prev    next >
Encoding:
AmigaDOS Script File  |  2002-08-18  |  3.0 KB  |  147 lines

  1. .key ""
  2. .bra {
  3. .ket }
  4.  
  5. failat 11
  6.  
  7. if $Language EQ "deutsch"
  8.     skip German
  9. endif
  10.  
  11. GCompare ? >nil: ;is GCompare in the search path?
  12. if warn
  13.     echo "Please copy GCompare in your search path or*Nthe directory of this compare script first."
  14.     wait 5
  15.     endcli
  16. endif
  17.  
  18. Version >NIL:
  19. if NOT $Workbench GE "39."
  20.     echo "*NThis script needs OS 3.0 or better.*N"
  21.     endcli
  22. endif
  23.  
  24. echo "*NCreating patchfile:*N"
  25.  
  26. echo "Old file:  " noline
  27. requestfile >ENV:gcold{$$} title "Select old file"
  28. if warn
  29.     echo "*N*NBreak."
  30.     endcli
  31. endif
  32. echo $gcold{$$}
  33.  
  34. echo "New file:  " noline
  35. requestfile >ENV:gcnew{$$} title "Select new file"
  36. if warn
  37.     echo "*N*NBreak."
  38.     endcli
  39. endif
  40. echo $gcnew{$$}
  41.  
  42. if NOT EXISTS ENV:lastpatchfile{$$}
  43.     echo >ENV:lastpatchfile{$$} ""
  44. endif
  45.  
  46. echo "Patch file:" noline
  47. requestfile >ENV:gcpatch{$$} $lastpatchfile{$$} noicons savemode title "Select patch file"
  48. if warn
  49.     echo "*N*NBreak."
  50.     endcli
  51. endif
  52. echo >ENV:lastpatchfile{$$} "file " noline
  53. type >>ENV:lastpatchfile{$$} ENV:gcpatch{$$}
  54. echo $gcpatch{$$}
  55.  
  56. RequestChoice >ENV:gcmodeX{$$} "Select operating mode" "Which operating mode GCompare shall use?*n*n" "Mode 1" "Mode 2" "Mode 3" "Mode 4" "Automatic" "Cancel"
  57. if $gcmodeX{$$} EQ "0"
  58.     echo "*NBreak."
  59.     endcli
  60. endif
  61. if $gcmodeX{$$} NOT GT "4"
  62.     echo >ENV:gcmode{$$} "mode " noline
  63.     echo >>ENV:gcmode{$$} $gcmodeX{$$}
  64. endif
  65.  
  66. if $gcmodeX{$$} EQ "5"
  67.     echo >ENV:gcmode{$$} "auto "
  68. endif
  69.  
  70. ;echo "*Ngcompare" $gcold{$$} $gcnew{$$} $gcpatch{$$} $gcmode{$$}
  71. echo ""
  72. changetaskpri -2
  73.  
  74. gcompare $gcold{$$} $gcnew{$$} $gcpatch{$$} $gcmode{$$}
  75. endcli
  76.  
  77. ;************
  78.  
  79.  
  80. LAB German
  81.  
  82. GCompare ? >nil: ;is GCompare in the search path?
  83. if warn
  84.     echo "Bitte kopieren Sie zuerst GCompare in den Suchpfad oder*Ndas Verzeichnis dieses Compare-Skripts."
  85.     wait 5
  86.     endcli
  87. endif
  88.  
  89. Version >NIL:
  90. if NOT $Workbench GE "39."
  91.     echo "*NDieses Skript läuft nur ab OS 3.0.*N"
  92.     endcli
  93. endif
  94.  
  95. echo "*NPatchdatei mit GCompare erzeugen:*N"
  96.  
  97. echo "Alte Datei: " noline
  98. requestfile >ENV:gcold{$$} title "Alte Datei auswählen"
  99. if warn
  100.     echo "*N*NAbbruch."
  101.     endcli
  102. endif
  103. echo $gcold{$$}
  104.  
  105. echo "Neue Datei: " noline
  106. requestfile >ENV:gcnew{$$} title "Neue Datei auswählen"
  107. if warn
  108.     echo "*N*NAbbruch."
  109.     endcli
  110. endif
  111. echo $gcnew{$$}
  112.  
  113. if NOT EXISTS ENV:lastpatchfile{$$}
  114.     echo >ENV:lastpatchfile{$$} ""
  115. endif
  116.  
  117. echo "Patch-Datei:" noline
  118. requestfile >ENV:gcpatch{$$} $lastpatchfile{$$} noicons savemode title "Patch-Datei auswählen"
  119. if warn
  120.     echo "*N*NAbbruch."
  121.     endcli
  122. endif
  123. echo >ENV:lastpatchfile{$$} "file " noline
  124. type >>ENV:lastpatchfile{$$} ENV:gcpatch{$$}
  125. echo $gcpatch{$$}
  126.  
  127. RequestChoice >ENV:gcmodeX{$$} "Betriebsart auswählen" "In welcher Betriebsart soll GCompare arbeiten?*n*n" "Mode 1" "Mode 2" "Mode 3" "Mode 4" "Automatik" "Abbruch"
  128. if $gcmodeX{$$} EQ "0"
  129.     echo "*NAbbruch."
  130.     endcli
  131. endif
  132. if $gcmodeX{$$} NOT GT "4"
  133.     echo >ENV:gcmode{$$} "mode " noline
  134.     echo >>ENV:gcmode{$$} $gcmodeX{$$}
  135. endif
  136.  
  137. if $gcmodeX{$$} EQ "6"
  138.     echo >ENV:gcmode{$$} "auto "
  139. endif
  140.  
  141. ;echo "*Ngcompare" $gcold{$$} $gcnew{$$} $gcpatch{$$} $gcmode{$$} "*N"
  142. echo ""
  143. changetaskpri -2
  144.  
  145. gcompare $gcold{$$} $gcnew{$$} $gcpatch{$$} $gcmode{$$}
  146.  
  147.